<?php
class Userfeedback extends CS_Controller
{
    public function _init()
    {
        $this->load->helper(array('common'));
        $this->load->library('pagination');
        $this->load->model('user_feed_back_model','user_feed_back');
    }

    /**
     * 列表
     * @param number $pg
     */
    public function grid($pg = 1)
    {
        $page_num = 20;
        $num = ($pg-1)*$page_num;
        $config['first_url'] = base_url('userfeedback/grid').$this->pageGetParam($this->input->get());
        $config['suffix'] = $this->pageGetParam($this->input->get());
        $config['base_url'] = base_url('userfeedback/grid');
        $config['total_rows'] = $this->user_feed_back->total($this->input->get());
        $config['uri_segment'] = 3;
        $this->pagination->initialize($config);
        $data['pg_list'] = $this->pagination->create_links();
        $data['line_list'] = $this->user_feed_back->page_list($page_num, $num, $this->input->get());
        $data['all_rows'] = $config['total_rows'];
        $data['pg_now'] = $pg;
		$data['feedBackType'] = userFeedBackTypeArray();
        $this->load->view('userfeedback/grid',$data);
    }
}